package com.onetime.mall.product.feign;

import com.onetime.common.to.SkuReductionTo;
import com.onetime.common.to.SpuBoundTo;
import com.onetime.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("mall-coupon")
public interface CouponFeignService {
    /**
     * 远程调用保存 SPU 积分
     * 只要 JSON 数据模型是兼容的，双方服务无需使用同一个 TO
     *
     * @param spuBoundTo 中间类
     * @return JSON
     */
    @PostMapping("/coupon/spubounds/save")
    R saveSPUBounds(@RequestBody SpuBoundTo spuBoundTo);

    /**
     * 保存SKU满减信息
     * @param skuReductionTo
     * @return
     */
    @PostMapping("/coupon/skufullreduction/saveInformation")
    R saveSKUReduction(@RequestBody SkuReductionTo skuReductionTo);
}
